<div>
    <form clrForm #emailForm="ngForm">
        <clr-input-container>
            <label>{{'APP_SMTP_ADDRESS'|translate}}</label>
            <input clrInput name="smtp_address" [(ngModel)]="item.vars['SMTP_ADDRESS']" size=45
                   placeholder="smtp.sina.com" required/>
        </clr-input-container>
        <clr-input-container>
            <label>{{'APP_SMTP_PORT'|translate}}</label>
            <input clrInput name="smtp_port" [(ngModel)]="item.vars['SMTP_PORT']" size=45
                   placeholder="25" required/>
        </clr-input-container>
        <clr-input-container>
            <label>{{'APP_SMTP_USERNAME'|translate}}</label>
            <input clrInput name="smtp_username" [(ngModel)]="item.vars['SMTP_USERNAME']" size=45 required/>
        </clr-input-container>
        <clr-input-container>
            <label>{{'APP_SMTP_PASSWORD'|translate}}</label>
            <input clrInput  type="password" name="smtp_password" [(ngModel)]="item.vars['SMTP_PASSWORD']" size=45 required/>
        </clr-input-container>
        <clr-input-container>
            <label>{{'APP_WORK_WEIXIN_USER'|translate}}</label>
            <input clrInput name="weixin_test" [(ngModel)]="item.vars['SMTP_TEST_USER']" size=45/>
            <clr-control-helper>{{'APP_WORK_WEIXIN_USER_HELPER'|translate}}</clr-control-helper>
        </clr-input-container>
        <clr-select-container>
            <label>{{'APP_SMTP_STATUS'|translate}}</label>
            <select class="input-width" clrSelect name="status" [(ngModel)]="item.vars['EMAIL_STATUS']" required>
                <option value="ENABLE">{{'APP_ENABLE'|translate}}</option>
                <option value="DISABLE">{{'APP_DISABLE'|translate}}</option>
            </select>
        </clr-select-container>
    </form>
    <button class="btn btn-success-outline" [disabled]="emailForm.invalid"
            (click)="checkValid('EMAIL')">{{'APP_SMTP_CHECK'|translate}}</button>
    <button class="btn btn-info-outline" (click)="onSubmit()"
            [disabled]="emailForm.invalid || !valid">
        {{'APP_COMMIT'|translate}}
    </button>
</div>
